]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: remove SearchResultDisplay base class
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 27 Nov 2012 20:05:32 +0000 (15:05 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 10 Dec 2012 21:50:54 +0000 (16:50 -0500)
It's unused, and the clear() method is just wrong. Remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=681797

js/ui/search.js
js/ui/searchDisplay.js

index 827e34d9bf9ba85d056fe4fb337677fe6f87ab12..b64de7e4cf9e40bd61faba8be862fe1e618a4090 100644 (file)
@@ -21,49 +21,6 @@ const MatchType = {
     PREFIX: 2
 };
 
-const SearchResultDisplay = new Lang.Class({
-    Name: 'SearchResultDisplay',
-
-    _init: function(provider) {
-        this.provider = provider;
-        this.actor = null;
-    },
-
-    /**
-     * renderResults:
-     * @results: List of identifier strings
-     * @terms: List of search term strings
-     *
-     * Display the given search matches which resulted
-     * from the given terms.  It's expected that not
-     * all results will fit in the space for the container
-     * actor; in this case, show as many as makes sense
-     * for your result type.
-     *
-     * The terms are useful for search match highlighting.
-     */
-    renderResults: function(results, terms) {
-        throw new Error('Not implemented');
-    },
-
-    /**
-     * clear:
-     * Remove all results from this display.
-     */
-    clear: function() {
-        this.actor.destroy_all_children();
-    },
-
-    /**
-     * getVisibleResultCount:
-     *
-     * Returns: The number of actors visible.
-     */
-    getVisibleResultCount: function() {
-        throw new Error('Not implemented');
-    },
-});
-
 /**
  * SearchProvider:
  *
index 4db34c59ec9df019878aec194346db13cffd81e4..08c1c797efb486e9b7ed77d9b814f5b7aba94002 100644 (file)
@@ -159,10 +159,9 @@ const GridSearchResult = new Lang.Class({
 
 const ListSearchResults = new Lang.Class({
     Name: 'ListSearchResults',
-    Extends: Search.SearchResultDisplay,
 
     _init: function(provider) {
-        this.parent(provider);
+        this.provider = provider;
 
         this.actor = new St.BoxLayout({ style_class: 'search-section-content' });
         this.providerIcon = new ProviderIcon(provider);
@@ -231,10 +230,9 @@ const ListSearchResults = new Lang.Class({
 
 const GridSearchResults = new Lang.Class({
     Name: 'GridSearchResults',
-    Extends: Search.SearchResultDisplay,
 
     _init: function(provider, grid) {
-        this.parent(provider);
+        this.provider = provider;
 
         this._grid = grid || new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
                                                      xAlign: St.Align.START });